using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MMM.Core.Domain;
using ServiceStack.ServiceHost;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using MMM.Services.Base;
using MMM.Services.Operations;
using MMM.Services.Type;

namespace MMM.Services
{

    public class BasicInfoService : BaseService<BasicInfo>
    {
        public override object OnPost(BasicInfo request)
        {
            if (request.Birthday.HasValue)
            {
                if (request.Birthday.Value.Equals(DateTime.MinValue))
                {
                    request.Birthday = null;
                }
            }
            return base.OnPost(request);
        }

        public override object OnGet(BasicInfo request)
        {
            return base.OnGet(request);
        }
    }

    public class BasicInfoGetSerice : BaseGetService<BasicInfoPageGet, BasicInfo>
    {
    }

    public class BasicInfoDeleteService : BaseDeleteService<BasicInfo, BasicInfoDelete>
    {
    }
}
